1. Technical Field
The present invention generally relates to distributed data processing systems and in particular to client-server data processing systems. Still more particularly, the present invention relates to command sets in a computer messaging system. Further, the present invention relates to modification of command sets on a server in a computer network.
2. Description of the Related Art
In the area of client-server computing, many computers interact over a computer network through messaging systems. Messages containing code define commands that a client may issue to the server computer to perform tasks on the server, such as accessing databases, starting a process, sorting search results, connecting to other computers, retrieving email, etc.
Typically, function codes and parameters are encoded in application-specific form. Frequently, the encoding process arranges function codes in a fixed order and with a fixed offset from the beginning of a message. The meaning of the function code and the interpretation of parameters is known only by the sending and receiving applications. As new releases of applications are prepared, encoding schemes used for function codes may vary. Updating sending and receiving (messaging) applications thus can become a continuous and complex task—especially in widely distributed systems.
Whether done by client or server, often there is a function that converts “gestures” or other input into these messages. This function is commonly known as a dispatch table or a command interpreter. An example of such a command interpreter function in the Java programming language is given in Table 1.
TABLE 1public SimpleCmd readCommand( ) throws IOException{SimpleCmd cdm;String commandName = readName( ) ;if (commandName.equalsIgnoreCase( “AddCmd” ) ) { cmd = new AddCmd( ) ;} else if (commandName.equalsIgnoreCase( “DeleteCmd” ) ) { cmd = new DeletCmd( ) ;} else if (commandName.equalsIgnoreCase( “GetCmd” ) ) { cmd = new GetCmd( ) ;} else if (commandName.equalsIgnoreCase( “PostCmd” ) ) { cmd = new PostCmd( ) ;} else if (commandName.equalsIgnoreCase( “DoneCmd” ) ) { cmd = new DoneCmd( ) ;} elsethrow new IOException( “unknown command ” + commandName ) ;cmd.setArgs( readArgs( ) ) ;return cmd;
The purpose of this function is to take a command name, given as a string, and find and instantiate a command object that will perform the command. The drawback to this type of dispatch table is the hard-coded nature of the command set. This example tests for five commands, but any commands that are not explicitly coded in the function are ignored and an error condition is signaled. If ever the system needed an additional command, the client or the server would have to be halted while new code is installed on the system.
There are other messaging systems that refer to commands by number rather than a name to reduce traffic congestion. This saves more network bandwidth than sending the command name, but the same problems of static rather than dynamic tables exist. Another type of messaging system creates a command on the client side and sends the entire command object to the server. This is known as command serialization or command marshalling/unmarshalling, and can tax network bandwidth.
There are a variety of situations in which it would be preferable not to halt the system to install new object code for the command interpreter or dispatch table. Most common are commercial sales applications on the Internet, which may experience heavy, round-the-clock traffic. Taking a sales application off-line for an upgrade may result in lost revenue due to customer disaffection.
It would therefore be desirable to provide a method and system that would allow new commands to be installed without pausing either the client or server computer. Also, it would be desirable to enlarge or reduce a command set without recompiling the code that contains the dispatch table.